<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>libasyncd: /home/wolkykim/ws/libasyncd/include/asyncd/ad_server.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">libasyncd
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('ad__server_8h.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">ad_server.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>ad_server header file  
<a href="#details">More...</a></p>

<p><a href="ad__server_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structad__server__s.html">ad_server_s</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Server info container.  <a href="structad__server__s.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structad__conn__s.html">ad_conn_s</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connection structure.  <a href="structad__conn__s.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a8d1358baba080a2f6b0d350928af7a89"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a8d1358baba080a2f6b0d350928af7a89">AD_OK</a>&#160;&#160;&#160;(0)</td></tr>
<tr class="separator:a8d1358baba080a2f6b0d350928af7a89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab31b601df43a52ea6ca3647c62da51c4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#ab31b601df43a52ea6ca3647c62da51c4">AD_TAKEOVER</a>&#160;&#160;&#160;(1)</td></tr>
<tr class="separator:ab31b601df43a52ea6ca3647c62da51c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65ea15debc10a5e82448ff065239c4ff"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a65ea15debc10a5e82448ff065239c4ff">AD_DONE</a>&#160;&#160;&#160;(2)</td></tr>
<tr class="separator:a65ea15debc10a5e82448ff065239c4ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b06b0e022e3225a5c252f0141cb5ae4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a3b06b0e022e3225a5c252f0141cb5ae4">AD_CLOSE</a>&#160;&#160;&#160;(3)</td></tr>
<tr class="separator:a3b06b0e022e3225a5c252f0141cb5ae4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc215edc66db6333bb058fb84ed332ca"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#adc215edc66db6333bb058fb84ed332ca">AD_SERVER_OPTIONS</a></td></tr>
<tr class="memdesc:adc215edc66db6333bb058fb84ed332ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Server option names and default values.  <a href="#adc215edc66db6333bb058fb84ed332ca">More...</a><br/></td></tr>
<tr class="separator:adc215edc66db6333bb058fb84ed332ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afcba550cce3f169b37f718e3a6a7a20c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#afcba550cce3f169b37f718e3a6a7a20c">AD_EVENT_INIT</a>&#160;&#160;&#160;(1)</td></tr>
<tr class="memdesc:afcba550cce3f169b37f718e3a6a7a20c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Event types.  <a href="#afcba550cce3f169b37f718e3a6a7a20c">More...</a><br/></td></tr>
<tr class="separator:afcba550cce3f169b37f718e3a6a7a20c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5cdb1e1bd63023d45c94447b4254b17d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a5cdb1e1bd63023d45c94447b4254b17d">AD_EVENT_READ</a>&#160;&#160;&#160;(1 &lt;&lt; 1)</td></tr>
<tr class="separator:a5cdb1e1bd63023d45c94447b4254b17d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ba189c66b4487ee0659d4b4e362ba4f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a7ba189c66b4487ee0659d4b4e362ba4f">AD_EVENT_WRITE</a>&#160;&#160;&#160;(1 &lt;&lt; 2)</td></tr>
<tr class="separator:a7ba189c66b4487ee0659d4b4e362ba4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6be13c8801f47101a25514526b524a7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#af6be13c8801f47101a25514526b524a7">AD_EVENT_CLOSE</a>&#160;&#160;&#160;(1 &lt;&lt; 3)</td></tr>
<tr class="separator:af6be13c8801f47101a25514526b524a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9dadbc14bb0003f3072d13594c81403e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a9dadbc14bb0003f3072d13594c81403e">AD_EVENT_TIMEOUT</a>&#160;&#160;&#160;(1 &lt;&lt; 4)</td></tr>
<tr class="separator:a9dadbc14bb0003f3072d13594c81403e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3b205b8862fd4a318005466961934f1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#ab3b205b8862fd4a318005466961934f1">AD_EVENT_SHUTDOWN</a>&#160;&#160;&#160;(1 &lt;&lt; 5)</td></tr>
<tr class="separator:ab3b205b8862fd4a318005466961934f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a387785dd0db9ef703e97eddf21674b05"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a387785dd0db9ef703e97eddf21674b05">AD_NUM_USERDATA</a>&#160;&#160;&#160;(2)</td></tr>
<tr class="memdesc:a387785dd0db9ef703e97eddf21674b05"><td class="mdescLeft">&#160;</td><td class="mdescRight">Defaults.  <a href="#a387785dd0db9ef703e97eddf21674b05">More...</a><br/></td></tr>
<tr class="separator:a387785dd0db9ef703e97eddf21674b05"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:aa7eb49058c165b0fa6cf9df9f8580d73"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structad__server__s.html">ad_server_s</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a></td></tr>
<tr class="separator:aa7eb49058c165b0fa6cf9df9f8580d73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13ab8ad0b151e6b08c548bb36daef631"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structad__conn__s.html">ad_conn_s</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a></td></tr>
<tr class="separator:a13ab8ad0b151e6b08c548bb36daef631"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a659a16c6e03fa96212bff528033efc84"><td class="memItemLeft" align="right" valign="top">typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a659a16c6e03fa96212bff528033efc84">ad_callback</a> )(short event, <a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a> *conn, void *userdata)</td></tr>
<tr class="memdesc:a659a16c6e03fa96212bff528033efc84"><td class="mdescLeft">&#160;</td><td class="mdescRight">User callback(hook) prototype.  <a href="#a659a16c6e03fa96212bff528033efc84">More...</a><br/></td></tr>
<tr class="separator:a659a16c6e03fa96212bff528033efc84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a483770c2534078a7ca37b2e6590329b8"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a483770c2534078a7ca37b2e6590329b8">ad_userdata_free_cb</a> )(<a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a> *conn, void *userdata)</td></tr>
<tr class="separator:a483770c2534078a7ca37b2e6590329b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a0fe91d344bc3f1610ea68bcec077b1c2"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a0fe91d344bc3f1610ea68bcec077b1c2">ad_log_e</a> { <br/>
&#160;&#160;<a class="el" href="ad__server_8h.html#a0fe91d344bc3f1610ea68bcec077b1c2a4822ba6b8a48d50ffab47e875a4eea85">AD_LOG_DISABLE</a> = 0, 
<a class="el" href="ad__server_8h.html#a0fe91d344bc3f1610ea68bcec077b1c2aadef4e51861783de662b590668c733f5">AD_LOG_ERROR</a>, 
<a class="el" href="ad__server_8h.html#a0fe91d344bc3f1610ea68bcec077b1c2ab705340dfe4deb52d8add04540e45b95">AD_LOG_WARN</a>, 
<a class="el" href="ad__server_8h.html#a0fe91d344bc3f1610ea68bcec077b1c2a854cafd75915f95a962aca0c189aebb4">AD_LOG_INFO</a>, 
<br/>
&#160;&#160;<a class="el" href="ad__server_8h.html#a0fe91d344bc3f1610ea68bcec077b1c2a8812ea0ff35c50043b69112e5988e906">AD_LOG_DEBUG</a>, 
<a class="el" href="ad__server_8h.html#a0fe91d344bc3f1610ea68bcec077b1c2a169716146eb4ebd68a9dfab24c9d018d">AD_LOG_DEBUG2</a>
<br/>
 }</td></tr>
<tr class="separator:a0fe91d344bc3f1610ea68bcec077b1c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a1f407e2708a0c9a141d5cbeed190d73b"><td class="memItemLeft" align="right" valign="top">enum <a class="el" href="ad__server_8h.html#a0fe91d344bc3f1610ea68bcec077b1c2">ad_log_e</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a1f407e2708a0c9a141d5cbeed190d73b">ad_log_level</a> (enum <a class="el" href="ad__server_8h.html#a0fe91d344bc3f1610ea68bcec077b1c2">ad_log_e</a> log_level)</td></tr>
<tr class="memdesc:a1f407e2708a0c9a141d5cbeed190d73b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set debug output level.  <a href="#a1f407e2708a0c9a141d5cbeed190d73b">More...</a><br/></td></tr>
<tr class="separator:a1f407e2708a0c9a141d5cbeed190d73b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a677263079eb999133e9a0be48dd2cba5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a677263079eb999133e9a0be48dd2cba5">ad_server_new</a> (void)</td></tr>
<tr class="memdesc:a677263079eb999133e9a0be48dd2cba5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a server object.  <a href="#a677263079eb999133e9a0be48dd2cba5">More...</a><br/></td></tr>
<tr class="separator:a677263079eb999133e9a0be48dd2cba5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75c74385ae98f9c9457534db0557d98e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a75c74385ae98f9c9457534db0557d98e">ad_server_start</a> (<a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *server)</td></tr>
<tr class="memdesc:a75c74385ae98f9c9457534db0557d98e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start server.  <a href="#a75c74385ae98f9c9457534db0557d98e">More...</a><br/></td></tr>
<tr class="separator:a75c74385ae98f9c9457534db0557d98e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c8229a12c31ee8a75a8099bae6dcf81"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a7c8229a12c31ee8a75a8099bae6dcf81">ad_server_stop</a> (<a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *server)</td></tr>
<tr class="memdesc:a7c8229a12c31ee8a75a8099bae6dcf81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop server.  <a href="#a7c8229a12c31ee8a75a8099bae6dcf81">More...</a><br/></td></tr>
<tr class="separator:a7c8229a12c31ee8a75a8099bae6dcf81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add3ea8aae949c0fa5a6bc9b0b0e1ec70"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#add3ea8aae949c0fa5a6bc9b0b0e1ec70">ad_server_free</a> (<a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *server)</td></tr>
<tr class="memdesc:add3ea8aae949c0fa5a6bc9b0b0e1ec70"><td class="mdescLeft">&#160;</td><td class="mdescRight">Release server object and all the resources.  <a href="#add3ea8aae949c0fa5a6bc9b0b0e1ec70">More...</a><br/></td></tr>
<tr class="separator:add3ea8aae949c0fa5a6bc9b0b0e1ec70"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac38aa4f50412ec4e3ed0e4f9b387e115"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#ac38aa4f50412ec4e3ed0e4f9b387e115">ad_server_global_free</a> (void)</td></tr>
<tr class="memdesc:ac38aa4f50412ec4e3ed0e4f9b387e115"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clean up all the global objects.  <a href="#ac38aa4f50412ec4e3ed0e4f9b387e115">More...</a><br/></td></tr>
<tr class="separator:ac38aa4f50412ec4e3ed0e4f9b387e115"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15edb8d7e1f406085dbf8c5a5c671bda"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a15edb8d7e1f406085dbf8c5a5c671bda">ad_server_set_option</a> (<a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *server, const char *key, const char *value)</td></tr>
<tr class="memdesc:a15edb8d7e1f406085dbf8c5a5c671bda"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set server option.  <a href="#a15edb8d7e1f406085dbf8c5a5c671bda">More...</a><br/></td></tr>
<tr class="separator:a15edb8d7e1f406085dbf8c5a5c671bda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac67bad711ee893259d4c4dc3717596ab"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#ac67bad711ee893259d4c4dc3717596ab">ad_server_get_option</a> (<a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *server, const char *key)</td></tr>
<tr class="memdesc:ac67bad711ee893259d4c4dc3717596ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve server option.  <a href="#ac67bad711ee893259d4c4dc3717596ab">More...</a><br/></td></tr>
<tr class="separator:ac67bad711ee893259d4c4dc3717596ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b2e3ec49198b4d35e29a95dc9f06dad"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a2b2e3ec49198b4d35e29a95dc9f06dad">ad_server_get_option_int</a> (<a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *server, const char *key)</td></tr>
<tr class="memdesc:a2b2e3ec49198b4d35e29a95dc9f06dad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve server option in integer format.  <a href="#a2b2e3ec49198b4d35e29a95dc9f06dad">More...</a><br/></td></tr>
<tr class="separator:a2b2e3ec49198b4d35e29a95dc9f06dad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7ad549632ecf501e170aac234703541"><td class="memItemLeft" align="right" valign="top">SSL_CTX *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#ac7ad549632ecf501e170aac234703541">ad_server_ssl_ctx_create_simple</a> (const char *cert_path, const char *pkey_path)</td></tr>
<tr class="memdesc:ac7ad549632ecf501e170aac234703541"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper method for creating minimal OpenSSL SSL_CTX object.  <a href="#ac7ad549632ecf501e170aac234703541">More...</a><br/></td></tr>
<tr class="separator:ac7ad549632ecf501e170aac234703541"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34aa318f8a3872aa1e756adb38acd664"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a34aa318f8a3872aa1e756adb38acd664">ad_server_set_ssl_ctx</a> (<a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *server, SSL_CTX *sslctx)</td></tr>
<tr class="memdesc:a34aa318f8a3872aa1e756adb38acd664"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach OpenSSL SSL_CTX to the server.  <a href="#a34aa318f8a3872aa1e756adb38acd664">More...</a><br/></td></tr>
<tr class="separator:a34aa318f8a3872aa1e756adb38acd664"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:addb05a5f42de5b20975a92fa69b52895"><td class="memItemLeft" align="right" valign="top">SSL_CTX *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#addb05a5f42de5b20975a92fa69b52895">ad_server_get_ssl_ctx</a> (<a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *server)</td></tr>
<tr class="memdesc:addb05a5f42de5b20975a92fa69b52895"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get OpenSSL SSL_CTX object.  <a href="#addb05a5f42de5b20975a92fa69b52895">More...</a><br/></td></tr>
<tr class="separator:addb05a5f42de5b20975a92fa69b52895"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fa3e3215415c9f7173f11ea1d276b8e"><td class="memItemLeft" align="right" valign="top">qhashtbl_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a7fa3e3215415c9f7173f11ea1d276b8e">ad_server_get_stats</a> (<a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *server, const char *key)</td></tr>
<tr class="memdesc:a7fa3e3215415c9f7173f11ea1d276b8e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return internal statistic counter map.  <a href="#a7fa3e3215415c9f7173f11ea1d276b8e">More...</a><br/></td></tr>
<tr class="separator:a7fa3e3215415c9f7173f11ea1d276b8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb61485fd4f4e2f13c93871558b58025"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#aeb61485fd4f4e2f13c93871558b58025">ad_server_register_hook</a> (<a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *server, <a class="el" href="ad__server_8h.html#a659a16c6e03fa96212bff528033efc84">ad_callback</a> cb, void *userdata)</td></tr>
<tr class="memdesc:aeb61485fd4f4e2f13c93871558b58025"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register user hook.  <a href="#aeb61485fd4f4e2f13c93871558b58025">More...</a><br/></td></tr>
<tr class="separator:aeb61485fd4f4e2f13c93871558b58025"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c319c4143b999a1c5e4b6d17415a500"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a4c319c4143b999a1c5e4b6d17415a500">ad_server_register_hook_on_method</a> (<a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *server, const char *method, <a class="el" href="ad__server_8h.html#a659a16c6e03fa96212bff528033efc84">ad_callback</a> cb, void *userdata)</td></tr>
<tr class="memdesc:a4c319c4143b999a1c5e4b6d17415a500"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register user hook on method name.  <a href="#a4c319c4143b999a1c5e4b6d17415a500">More...</a><br/></td></tr>
<tr class="separator:a4c319c4143b999a1c5e4b6d17415a500"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e2e8a73baf14dafa0842b76f31765df"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a6e2e8a73baf14dafa0842b76f31765df">ad_conn_set_userdata</a> (<a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a> *conn, const void *userdata, <a class="el" href="ad__server_8h.html#a483770c2534078a7ca37b2e6590329b8">ad_userdata_free_cb</a> free_cb)</td></tr>
<tr class="memdesc:a6e2e8a73baf14dafa0842b76f31765df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attach userdata into the connection.  <a href="#a6e2e8a73baf14dafa0842b76f31765df">More...</a><br/></td></tr>
<tr class="separator:a6e2e8a73baf14dafa0842b76f31765df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5630244c7bb627a0561439f3cd24aca"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#ae5630244c7bb627a0561439f3cd24aca">ad_conn_get_userdata</a> (<a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a> *conn)</td></tr>
<tr class="memdesc:ae5630244c7bb627a0561439f3cd24aca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get userdata attached in the connection.  <a href="#ae5630244c7bb627a0561439f3cd24aca">More...</a><br/></td></tr>
<tr class="separator:ae5630244c7bb627a0561439f3cd24aca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ed8e931164315ca27568958a1d70316"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a5ed8e931164315ca27568958a1d70316">ad_conn_set_extra</a> (<a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a> *conn, const void *extra, <a class="el" href="ad__server_8h.html#a483770c2534078a7ca37b2e6590329b8">ad_userdata_free_cb</a> free_cb)</td></tr>
<tr class="memdesc:a5ed8e931164315ca27568958a1d70316"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set extra userdata into the connection.  <a href="#a5ed8e931164315ca27568958a1d70316">More...</a><br/></td></tr>
<tr class="separator:a5ed8e931164315ca27568958a1d70316"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6dd41a4169cd1fcbac17462fa6b5cf8"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#ad6dd41a4169cd1fcbac17462fa6b5cf8">ad_conn_get_extra</a> (<a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a> *conn)</td></tr>
<tr class="memdesc:ad6dd41a4169cd1fcbac17462fa6b5cf8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get extra userdata attached in this connection.  <a href="#ad6dd41a4169cd1fcbac17462fa6b5cf8">More...</a><br/></td></tr>
<tr class="separator:ad6dd41a4169cd1fcbac17462fa6b5cf8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef5876145774e9c6d38e68c06d05e34c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#aef5876145774e9c6d38e68c06d05e34c">ad_conn_set_method</a> (<a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a> *conn, char *method)</td></tr>
<tr class="memdesc:aef5876145774e9c6d38e68c06d05e34c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set method name on this connection.  <a href="#aef5876145774e9c6d38e68c06d05e34c">More...</a><br/></td></tr>
<tr class="separator:aef5876145774e9c6d38e68c06d05e34c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ba67b542d4ba48ad4a25280d10ef86f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ad__server_8h.html#a5ba67b542d4ba48ad4a25280d10ef86f">ad_conn_get_socket</a> (<a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a> *conn)</td></tr>
<tr class="memdesc:a5ba67b542d4ba48ad4a25280d10ef86f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return socket file descriptor associated with a connection.  <a href="#a5ba67b542d4ba48ad4a25280d10ef86f">More...</a><br/></td></tr>
<tr class="separator:a5ba67b542d4ba48ad4a25280d10ef86f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>ad_server header file </p>

<p>Definition in file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a8d1358baba080a2f6b0d350928af7a89"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AD_OK&#160;&#160;&#160;(0)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>I'm done with this request. Escalate to other hooks. </p>

<p>Definition at line <a class="el" href="ad__server_8h_source.html#l00057">57</a> of file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>

</div>
</div>
<a class="anchor" id="ab31b601df43a52ea6ca3647c62da51c4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AD_TAKEOVER&#160;&#160;&#160;(1)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>I'll handle the buffer directly this time, skip next hook </p>

<p>Definition at line <a class="el" href="ad__server_8h_source.html#l00058">58</a> of file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>

</div>
</div>
<a class="anchor" id="a65ea15debc10a5e82448ff065239c4ff"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AD_DONE&#160;&#160;&#160;(2)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>We're done with this request but keep the connection open. </p>

<p>Definition at line <a class="el" href="ad__server_8h_source.html#l00059">59</a> of file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>

</div>
</div>
<a class="anchor" id="a3b06b0e022e3225a5c252f0141cb5ae4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AD_CLOSE&#160;&#160;&#160;(3)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>We're done with this request. Close as soon as we sent all data out. </p>

<p>Definition at line <a class="el" href="ad__server_8h_source.html#l00060">60</a> of file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>

</div>
</div>
<a class="anchor" id="adc215edc66db6333bb058fb84ed332ca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AD_SERVER_OPTIONS</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">{  \</div>
<div class="line">        { <span class="stringliteral">&quot;server.port&quot;</span>,        <span class="stringliteral">&quot;8888&quot;</span> },                                   \</div>
<div class="line">                                                                            \</div>
<div class="line">        <span class="comment">/* Addr format IPv4=&quot;1.2.3.4&quot;, IPv6=&quot;1:2:3:4:5:6&quot;, Unix=&quot;/path&quot; */</span>  \</div>
<div class="line">        { <span class="stringliteral">&quot;server.addr&quot;</span>,        <span class="stringliteral">&quot;0.0.0.0&quot;</span> },                                \</div>
<div class="line">                                                                            \</div>
<div class="line">        { <span class="stringliteral">&quot;server.backlog&quot;</span>,     <span class="stringliteral">&quot;128&quot;</span> },                                    \</div>
<div class="line">                                                                            \</div>
<div class="line">        <span class="comment">/* Set read timeout seconds. 0 means no timeout. */</span>                 \</div>
<div class="line">        { <span class="stringliteral">&quot;server.timeout&quot;</span>,     <span class="stringliteral">&quot;0&quot;</span> },                                      \</div>
<div class="line">                                                                            \</div>
<div class="line">        <span class="comment">/* SSL options */</span>                                                   \</div>
<div class="line">        { <span class="stringliteral">&quot;server.enable_ssl&quot;</span>, <span class="stringliteral">&quot;0&quot;</span> },                                       \</div>
<div class="line">        { <span class="stringliteral">&quot;server.ssl_cert&quot;</span>, <span class="stringliteral">&quot;/usr/local/etc/ad_server/ad_server.crt&quot;</span> },    \</div>
<div class="line">        { <span class="stringliteral">&quot;server.ssl_pkey&quot;</span>, <span class="stringliteral">&quot;/usr/local/etc/ad_server/ad_server.key&quot;</span> },    \</div>
<div class="line">                                                                            \</div>
<div class="line">        <span class="comment">/* Enable or disable request pipelining, this change AD_DONE&#39;s behavior */</span> \</div>
<div class="line">        { <span class="stringliteral">&quot;server.request_pipelining&quot;</span>, <span class="stringliteral">&quot;1&quot;</span> },                               \</div>
<div class="line">                                                                            \</div>
<div class="line">        <span class="comment">/* Run server in a separate thread */</span>                               \</div>
<div class="line">        { <span class="stringliteral">&quot;server.thread&quot;</span>, <span class="stringliteral">&quot;0&quot;</span> },                                           \</div>
<div class="line">                                                                            \</div>
<div class="line">        <span class="comment">/* Collect resources after stop */</span>                                  \</div>
<div class="line">        { <span class="stringliteral">&quot;server.free_on_stop&quot;</span>, <span class="stringliteral">&quot;1&quot;</span> },                                     \</div>
<div class="line">                                                                            \</div>
<div class="line">        <span class="comment">/* End of array marker. Do not remove */</span>                            \</div>
<div class="line">        { <span class="stringliteral">&quot;&quot;</span>, <span class="stringliteral">&quot;_END_&quot;</span> }                                                     \</div>
<div class="line">};</div>
</div><!-- fragment -->
<p>Server option names and default values. </p>

<p>Definition at line <a class="el" href="ad__server_8h_source.html#l00081">81</a> of file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>

</div>
</div>
<a class="anchor" id="afcba550cce3f169b37f718e3a6a7a20c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AD_EVENT_INIT&#160;&#160;&#160;(1)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Event types. </p>
<p>Call once upon new connection. </p>

<p>Definition at line <a class="el" href="ad__server_8h_source.html#l00123">123</a> of file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>

</div>
</div>
<a class="anchor" id="a5cdb1e1bd63023d45c94447b4254b17d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AD_EVENT_READ&#160;&#160;&#160;(1 &lt;&lt; 1)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call on read </p>

<p>Definition at line <a class="el" href="ad__server_8h_source.html#l00124">124</a> of file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>

</div>
</div>
<a class="anchor" id="a7ba189c66b4487ee0659d4b4e362ba4f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AD_EVENT_WRITE&#160;&#160;&#160;(1 &lt;&lt; 2)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call on write. </p>

<p>Definition at line <a class="el" href="ad__server_8h_source.html#l00125">125</a> of file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>

</div>
</div>
<a class="anchor" id="af6be13c8801f47101a25514526b524a7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AD_EVENT_CLOSE&#160;&#160;&#160;(1 &lt;&lt; 3)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Call before closing. </p>

<p>Definition at line <a class="el" href="ad__server_8h_source.html#l00126">126</a> of file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>

</div>
</div>
<a class="anchor" id="a9dadbc14bb0003f3072d13594c81403e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AD_EVENT_TIMEOUT&#160;&#160;&#160;(1 &lt;&lt; 4)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Timeout indicator, this flag will be set with AD_EVENT_CLOSE. </p>

<p>Definition at line <a class="el" href="ad__server_8h_source.html#l00127">127</a> of file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>

</div>
</div>
<a class="anchor" id="ab3b205b8862fd4a318005466961934f1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AD_EVENT_SHUTDOWN&#160;&#160;&#160;(1 &lt;&lt; 5)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Shutdown indicator, this flag will be set with AD_EVENT_CLOSE. </p>

<p>Definition at line <a class="el" href="ad__server_8h_source.html#l00128">128</a> of file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>

</div>
</div>
<a class="anchor" id="a387785dd0db9ef703e97eddf21674b05"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define AD_NUM_USERDATA&#160;&#160;&#160;(2)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Defaults. </p>
<p>Number of userdata. Currently 0 is for userdata, 1 is for extra. </p>

<p>Definition at line <a class="el" href="ad__server_8h_source.html#l00133">133</a> of file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="aa7eb49058c165b0fa6cf9df9f8580d73"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structad__server__s.html">ad_server_s</a> <a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="ad__server_8h_source.html#l00051">51</a> of file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>

</div>
</div>
<a class="anchor" id="a13ab8ad0b151e6b08c548bb36daef631"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structad__conn__s.html">ad_conn_s</a> <a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="ad__server_8h_source.html#l00052">52</a> of file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>

</div>
</div>
<a class="anchor" id="a659a16c6e03fa96212bff528033efc84"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int(* ad_callback)(short event, <a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a> *conn, void *userdata)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>User callback(hook) prototype. </p>

<p>Definition at line <a class="el" href="ad__server_8h_source.html#l00117">117</a> of file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>

</div>
</div>
<a class="anchor" id="a483770c2534078a7ca37b2e6590329b8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* ad_userdata_free_cb)(<a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a> *conn, void *userdata)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="ad__server_8h_source.html#l00118">118</a> of file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="a0fe91d344bc3f1610ea68bcec077b1c2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="ad__server_8h.html#a0fe91d344bc3f1610ea68bcec077b1c2">ad_log_e</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="a0fe91d344bc3f1610ea68bcec077b1c2a4822ba6b8a48d50ffab47e875a4eea85"></a>AD_LOG_DISABLE</em>&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a0fe91d344bc3f1610ea68bcec077b1c2aadef4e51861783de662b590668c733f5"></a>AD_LOG_ERROR</em>&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a0fe91d344bc3f1610ea68bcec077b1c2ab705340dfe4deb52d8add04540e45b95"></a>AD_LOG_WARN</em>&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a0fe91d344bc3f1610ea68bcec077b1c2a854cafd75915f95a962aca0c189aebb4"></a>AD_LOG_INFO</em>&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a0fe91d344bc3f1610ea68bcec077b1c2a8812ea0ff35c50043b69112e5988e906"></a>AD_LOG_DEBUG</em>&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a0fe91d344bc3f1610ea68bcec077b1c2a169716146eb4ebd68a9dfab24c9d018d"></a>AD_LOG_DEBUG2</em>&#160;</td><td class="fielddoc">
</td></tr>
</table>

<p>Definition at line <a class="el" href="ad__server_8h_source.html#l00065">65</a> of file <a class="el" href="ad__server_8h_source.html">ad_server.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a1f407e2708a0c9a141d5cbeed190d73b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="ad__server_8h.html#a0fe91d344bc3f1610ea68bcec077b1c2">ad_log_e</a> ad_log_level </td>
          <td>(</td>
          <td class="paramtype">enum <a class="el" href="ad__server_8h.html#a0fe91d344bc3f1610ea68bcec077b1c2">ad_log_e</a>&#160;</td>
          <td class="paramname"><em>log_level</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set debug output level. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">debug_level</td><td>debug output level. 0 to disable.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>previous debug level.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>debug_level: AD_LOG_DISABLE AD_LOG_ERROR AD_LOG_WARN (default) AD_LOG_INFO AD_LOG_DEBUG AD_LOG_DEBUG2 </dd></dl>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00126">126</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="a677263079eb999133e9a0be48dd2cba5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a>* ad_server_new </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a server object. </p>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00135">135</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="a75c74385ae98f9c9457534db0557d98e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ad_server_start </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *&#160;</td>
          <td class="paramname"><em>server</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start server. </p>
<dl class="section return"><dt>Returns</dt><dd>0 if successful, otherwise -1. </dd></dl>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00164">164</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="a7c8229a12c31ee8a75a8099bae6dcf81"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ad_server_stop </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *&#160;</td>
          <td class="paramname"><em>server</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Stop server. </p>
<p>This call is be used to stop a server from different thread.</p>
<dl class="section return"><dt>Returns</dt><dd>0 if successful, otherwise -1. </dd></dl>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00287">287</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="add3ea8aae949c0fa5a6bc9b0b0e1ec70"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ad_server_free </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *&#160;</td>
          <td class="paramname"><em>server</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Release server object and all the resources. </p>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00303">303</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="ac38aa4f50412ec4e3ed0e4f9b387e115"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ad_server_global_free </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clean up all the global objects. </p>
<p>This will make memory-leak checkers happy. There are globally shared resources in libevent and openssl and it's usually not a problem since they don't grow but having these can confuse some debugging tools into thinking as memory leak. If you need to make sure that libasyncd has released all internal library-global data structures, call this. </p>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00352">352</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="a15edb8d7e1f406085dbf8c5a5c671bda"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ad_server_set_option </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *&#160;</td>
          <td class="paramname"><em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set server option. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="ad__server_8h.html#adc215edc66db6333bb058fb84ed332ca" title="Server option names and default values. ">AD_SERVER_OPTIONS</a> </dd></dl>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00370">370</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="ac67bad711ee893259d4c4dc3717596ab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* ad_server_get_option </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *&#160;</td>
          <td class="paramname"><em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>key</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieve server option. </p>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00377">377</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="a2b2e3ec49198b4d35e29a95dc9f06dad"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ad_server_get_option_int </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *&#160;</td>
          <td class="paramname"><em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>key</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieve server option in integer format. </p>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00384">384</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="ac7ad549632ecf501e170aac234703541"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SSL_CTX* ad_server_ssl_ctx_create_simple </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>cert_path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>pkey_path</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Helper method for creating minimal OpenSSL SSL_CTX object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cert_path</td><td>path to a PEM encoded certificate file </td></tr>
    <tr><td class="paramname">pkey_path</td><td>path to a PEM encoded private key file</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>newly allocated SSL_CTX object or NULL on failure</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This function initializes SSL_CTX with minimum default with "SSLv23_server_method" which will make the server understand SSLv2, SSLv3, and TLSv1 protocol.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="ad__server_8c.html#a34aa318f8a3872aa1e756adb38acd664" title="Attach OpenSSL SSL_CTX to the server. ">ad_server_set_ssl_ctx()</a> </dd></dl>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00404">404</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="a34aa318f8a3872aa1e756adb38acd664"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ad_server_set_ssl_ctx </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *&#160;</td>
          <td class="paramname"><em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SSL_CTX *&#160;</td>
          <td class="paramname"><em>sslctx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Attach OpenSSL SSL_CTX to the server. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">server</td><td>a valid server instance </td></tr>
    <tr><td class="paramname">sslctx</td><td>allocated and configured SSL_CTX object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function attached SSL_CTX object to the server causing it to communicate over SSL. Use <a class="el" href="ad__server_8c.html#ac7ad549632ecf501e170aac234703541" title="Helper method for creating minimal OpenSSL SSL_CTX object. ">ad_server_ssl_ctx_create_simple()</a> to quickly create a simple SSL_CTX object or make your own with OpenSSL directly. This function must never be called when ad_server is running.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="ad__server_8c.html#ac7ad549632ecf501e170aac234703541" title="Helper method for creating minimal OpenSSL SSL_CTX object. ">ad_server_ssl_ctx_create_simple()</a> </dd></dl>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00434">434</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="addb05a5f42de5b20975a92fa69b52895"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SSL_CTX* ad_server_get_ssl_ctx </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *&#160;</td>
          <td class="paramname"><em>server</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get OpenSSL SSL_CTX object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">server</td><td>a valid server instance </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SSL_CTX object, NULL if not enabled.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>As a general rule the returned SSL_CTX object must not be modified while server is running as it may cause unpredictable results. However, it is safe to use it for reading SSL statistics. </dd></dl>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00454">454</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="a7fa3e3215415c9f7173f11ea1d276b8e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">qhashtbl_t* ad_server_get_stats </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *&#160;</td>
          <td class="paramname"><em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>key</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return internal statistic counter map. </p>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00461">461</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="aeb61485fd4f4e2f13c93871558b58025"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ad_server_register_hook </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *&#160;</td>
          <td class="paramname"><em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#a659a16c6e03fa96212bff528033efc84">ad_callback</a>&#160;</td>
          <td class="paramname"><em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userdata</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Register user hook. </p>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00468">468</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="a4c319c4143b999a1c5e4b6d17415a500"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ad_server_register_hook_on_method </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#aa7eb49058c165b0fa6cf9df9f8580d73">ad_server_t</a> *&#160;</td>
          <td class="paramname"><em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>method</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#a659a16c6e03fa96212bff528033efc84">ad_callback</a>&#160;</td>
          <td class="paramname"><em>cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userdata</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Register user hook on method name. </p>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00475">475</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="a6e2e8a73baf14dafa0842b76f31765df"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* ad_conn_set_userdata </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>userdata</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#a483770c2534078a7ca37b2e6590329b8">ad_userdata_free_cb</a>&#160;</td>
          <td class="paramname"><em>free_cb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Attach userdata into the connection. </p>
<dl class="section return"><dt>Returns</dt><dd>previous userdata; </dd></dl>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00490">490</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="ae5630244c7bb627a0561439f3cd24aca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* ad_conn_get_userdata </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get userdata attached in the connection. </p>
<dl class="section return"><dt>Returns</dt><dd>previous userdata; </dd></dl>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00499">499</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="a5ed8e931164315ca27568958a1d70316"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* ad_conn_set_extra </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>extra</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#a483770c2534078a7ca37b2e6590329b8">ad_userdata_free_cb</a>&#160;</td>
          <td class="paramname"><em>free_cb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set extra userdata into the connection. </p>
<dl class="section return"><dt>Returns</dt><dd>previous userdata;</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Extra userdata is for default protocol handler such as ad_http_handler to provide higher abstraction. End users should always use only <a class="el" href="ad__server_8c.html#a6e2e8a73baf14dafa0842b76f31765df" title="Attach userdata into the connection. ">ad_conn_set_userdata()</a> to avoid any conflict with default handlers. </dd></dl>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00513">513</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="ad6dd41a4169cd1fcbac17462fa6b5cf8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* ad_conn_get_extra </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get extra userdata attached in this connection. </p>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00520">520</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="aef5876145774e9c6d38e68c06d05e34c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ad_conn_set_method </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>method</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set method name on this connection. </p>
<p>Once the method name is set, hooks registered by <a class="el" href="ad__server_8c.html#a4c319c4143b999a1c5e4b6d17415a500" title="Register user hook on method name. ">ad_server_register_hook_on_method()</a> will be called if method name matches with the registered name.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="ad__server_8c.html#a4c319c4143b999a1c5e4b6d17415a500" title="Register user hook on method name. ">ad_server_register_hook_on_method()</a> </dd></dl>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00532">532</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
<a class="anchor" id="a5ba67b542d4ba48ad4a25280d10ef86f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ad_conn_get_socket </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="ad__server_8h.html#a13ab8ad0b151e6b08c548bb36daef631">ad_conn_t</a> *&#160;</td>
          <td class="paramname"><em>conn</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return socket file descriptor associated with a connection. </p>

<p>Definition at line <a class="el" href="ad__server_8c_source.html#l00543">543</a> of file <a class="el" href="ad__server_8c_source.html">ad_server.c</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_9273431fadbcee3009b231da59d31b6f.html">asyncd</a></li><li class="navelem"><a class="el" href="ad__server_8h.html">ad_server.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
